var path = require("path");

function resolve(dir) {
  console.log(__dirname);
  return path.join(__dirname, dir);
}

module.exports = {
  chainWebpack: (config) => {
    config.resolve.alias.set("@", resolve("src")); // 设置别名 @ 等于src
  },
  devServer: {
    proxy: {
      "/": {
        target: "https://www.dddbh.com/",
        changeOrigin: true,
        pathRewrite: { "^/": "/" },
      },
    },
  },
};
